#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char* mystrcat(char* str1, char* str2)
{
	int i=0,j=0,k=0;
	char *p=str1;
	char *q=str2;
	if (p != NULL)
	{
		while (*p++ != '\0')
			i++;
	}
	if (q != NULL)
	{
		while (*q++ != '\0')
			j++;
	}
	char *p2=str1;
	char *q2=str2;
	char *t=(char*)malloc(sizeof(char)*(i+j+1));
	for (k=0;k<i;k++)
	{
		*(t+k)=*p2++;
	}
	for (k=0;k<j;k++)
	{
		*(t+k+i)=*q2++;
	}
	*(t+i+j)='\0';
	return t;
}

int main()
{
	char *s1=NULL;
	char *s2=NULL;
	char *s;
	s=mystrcat(s1,s2);
	int i=0;
	while (s[i]!='\0')
	{
		printf("%c",s[i]);
		i++;
	}
	printf("\n");
	return 0;
}
